package com.java.CarDemo;

public class Lorry extends Car implements rent{
    private float load;

    public Lorry() {
    }

    public Lorry(int carNumber, String brand, String color, double price, float output, float load) {
        super(carNumber, brand, color, price, output);
        this.load = load;
    }

    public float getLoad() {
        return load;
    }

    public void setLoad(float load) {
        this.load = load;
    }

    @Override
    public float rentPrice() {
        //卡车 一天=1500 + 载重 * 100
        return 1500 + load*100;
    }
}
